package com.vf.user.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.vf.common.annotation.Excel;
import com.vf.common.core.domain.BaseEntity;

/**
 * 信用分变更记录对象 credit_history
 * 
 * @author LBS
 * @date 2025-06-04
 */
public class CreditHistory extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 记录ID */
    private Long historyId;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 信用分变动值 */
    @Excel(name = "信用分变动值")
    private BigDecimal changeAmount;

    /** 变动后分数 */
    @Excel(name = "变动后分数")
    private BigDecimal newScore;

    /** 结果 */
    @Excel(name = "结果")
    private String reason;

    /** 相关活动 ID */
    @Excel(name = "相关活动 ID")
    private Long relatedActivityId;

    /** 相关投诉 ID */
    @Excel(name = "相关投诉 ID")
    private Long relatedComplaintId;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    public void setHistoryId(Long historyId) 
    {
        this.historyId = historyId;
    }

    public Long getHistoryId() 
    {
        return historyId;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setChangeAmount(BigDecimal changeAmount) 
    {
        this.changeAmount = changeAmount;
    }

    public BigDecimal getChangeAmount() 
    {
        return changeAmount;
    }
    public void setNewScore(BigDecimal newScore) 
    {
        this.newScore = newScore;
    }

    public BigDecimal getNewScore() 
    {
        return newScore;
    }
    public void setReason(String reason) 
    {
        this.reason = reason;
    }

    public String getReason() 
    {
        return reason;
    }
    public void setRelatedActivityId(Long relatedActivityId) 
    {
        this.relatedActivityId = relatedActivityId;
    }

    public Long getRelatedActivityId() 
    {
        return relatedActivityId;
    }
    public void setRelatedComplaintId(Long relatedComplaintId) 
    {
        this.relatedComplaintId = relatedComplaintId;
    }

    public Long getRelatedComplaintId() 
    {
        return relatedComplaintId;
    }
    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("historyId", getHistoryId())
            .append("userId", getUserId())
            .append("changeAmount", getChangeAmount())
            .append("newScore", getNewScore())
            .append("reason", getReason())
            .append("relatedActivityId", getRelatedActivityId())
            .append("relatedComplaintId", getRelatedComplaintId())
            .append("createdAt", getCreatedAt())
            .toString();
    }
}
